#!/usr/bin/perl -w
use warnings;
package lib::SATINFO;
my $sat = 0;
# This is kind of messy, I just wanted it to be OOP and locally available while wardriving:
my $generic_desc='GPS Block 2 was the operational system, following the demonstration system comprised of Block 1 (Navstar 1 - 11) spacecraft. These spacecraft were 3-axis stabilized, nadir pointing using reaction wheels. Dual solar arrays supplied 710 watts of power. They used S-band (SGLS) communications for control and telemetry and UHF cross-link between spacecraft. The payload consisted of two L-band navigation signals at 1575.42 MHz (L1) and 1227.60 MHz (L2). Each spacecraft carried 2 rubidium and 2 cesium clocks and nuclear detonation detection sensors. Built by Rockwell Space Systems for the US Air Force.';
my @sats =(
{'thereshouldbenozero'=>0},
{'PRN'=>1,'NORADID'=>37753,'INTCODE'=>'2011-036A','LD'=>'July 16 2011','OWN'=>'US','NAVSTAR'=>'66 USA-232','TRIV'=>'Navstar 66, a US Air Force satellite, was launched from Cape Canaveral on 16 July 2011 at 06:41 UT by a Delta 4 rocket. The satellite is part of the GPS constellation which is comprised of 31 operational satellites.The GPS constellation satellites orbit about 11,000 nautical miles above the planet and emit continuous navigation signals that allow users to find their location in latitude, longitude and altitude and determine time. The constellation features six orbital planes with multiple satellites flying in each. Navstar 66 will occupy the Plane D, slot 2A location of the network and is expected to enter service approximately 30 days after launch. It will replace the Navstar 39 satellite.'},
{'PRN'=>2,'NORADID'=>28474,'INTCODE'=>'2004-045A','LD'=>'Nov 6 2004','OWN'=>'US','NAVSTAR'=>'56 USA-180','TRIV'=>'Navstar 56, also known as USA 180 and as GPS 2R-13, is an American navigational satellite that was launched by a Delta 2 rocket from Cape Canaveral at 05:39 UT on 6 November 2004. It is part of the 24-element GPS fleet and will replace the oldest member of the fleet, GPS 2A-11 launched in July 1991. It will be located in Plane D, Slot 1 position.'},
{'PRN'=>3,'NORADID'=>23833,'INTCODE'=>'1996-019A','LD'=>'Mar 28 1996','OWN'=>'US','NAVSTAR'=>'37 USA-117','TRIV'=>$generic_desc},
{'PRN'=>4,'NORADID'=>22877,'INTCODE'=>'1993-068A','LD'=>'Oct 26 1993','OWN'=>'US','NAVSTAR'=>'35 USA-96','TRIV'=>$generic_desc},
{'PRN'=>5,'NORADID'=>35752,'INTCODE'=>'2009-043A','LD'=>'Aug 17 2009','OWN'=>'US','NAVSTAR'=>'64 USA-206','TRIV'=>'Navstar 64, also known as USA 206 and as GPS 2R-21(M), is an American (DOD) navigational craft in the GPS fleet, that was launched by a Delta 2 rocket from Cape Canaveral at 10:35 UT on 17 August 2009.'},
{'PRN'=>6,'NORADID'=>23027,'INTCODE'=>'1994-016A','LD'=>'Mar 10 1994','OWN'=>'US','NAVSTAR'=>'36 USA-100','TRIV'=>$generic_desc},
{'PRN'=>7,'NORADID'=>32711,'INTCODE'=>'2008-012A','LD'=>'Mar 15 2008','OWN'=>'US','NAVSTAR'=>'62 USA-201','TRIV'=>'Navstar 62, also known as USA 201 and as GPS 2R-19(M), is an American navigational craft in the GPS fleet, that was launched by a Delta 2 rocket from Cape Canaveral at 06:09 UT on 15 March 2008. It will be a stand-by replacement satellite.'},
{'PRN'=>8,'NORADID'=>25030,'INTCODE'=>'1997-067A','LD'=>'Nov 6 1997','OWN'=>'US','NAVSTAR'=>'44 USA-135','TRIV'=>$generic_desc},
{'PRN'=>9,'NORADID'=>22700,'INTCODE'=>'1993-042A','LD'=>'Jun 26 1993','OWN'=>'US','NAVSTAR'=>'33 USA-92','TRIV'=>$generic_desc},
{'PRN'=>10,'NORADID'=>23953,'INTCODE'=>'1996-041A','LD'=>'Jul 16 1996','OWN'=>'US','NAVSTAR'=>'38 USA-126','TRIV'=>$generic_desc},
# 10
{'PRN'=>11,'NORADID'=>25933,'INTCODE'=>'1999-055A','LD'=>'Oct 7 1999','OWN'=>'US','NAVSTAR'=>'46 USA-145','TRIV'=>'NAVSTAR 46 (also known as USA 145, and GPS 2R-3) was an American navigational spacecraft of the GPS fleet launched by a Delta 2 rocket from Cape Canaveral at 13:51 UT. This was the third of the 21 redesigned 2R series that may eventually replace the existing GPS fleet. With this launch, the GPS fleet has now 28 operational spacecraft.'},
{'PRN'=>12,'NORADID'=>29601,'INTCODE'=>'2006-052A','LD'=>'Nov 17 2006','OWN'=>'US','NAVSTAR'=>'59 USA-192','TRIV'=>'Navstar 59, also known as USA 192, as GPS 2RM F-3, and as GPS 2R-16, is an American navigational satellite in the GPS fleet that was launched by a Delta 2 rocket from Cape Canaveral at 19:12 UT on 17 November 2006. The two tonne (with fuel) satellite will be nudged into Plane B, Slot 4 position to replace the aging GPS 2A-22 of 1993 vintage. The fleet now consists of 29 satellites, including the spares. Navstar 59 has a new civilian signal that helps remove the directional inaccuracy engendered by the ionosphere.'},
{'PRN'=>13,'NORADID'=>24876,'INTCODE'=>'1997-035A','LD'=>'Jul 23 1997','OWN'=>'US','NAVSTAR'=>'43 USA-132','TRIV'=>$generic_desc},
{'PRN'=>14,'NORADID'=>26605,'INTCODE'=>'2000-071A','LD'=>'Nov 10 2000','OWN'=>'US','NAVSTAR'=>'49 USA-154','TRIV'=>'Navstar 49 (USA 154) is an American navigational satellite in the GPS fleet that was launched by a Delta 2 rocket at 17:14 UT from Vandenberg AFB.'},
{'PRN'=>15,'NORADID'=>32260,'INTCODE'=>'2007-047A','LD'=>'Oct 17 2007','OWN'=>'US','NAVSTAR'=>'60 USA-196','TRIV'=>'GPS 2R-17, also known as Navstar 60 and as USA 196, is the latest addition to the American fleet of navigational satellites. It was launched by a Delta 2 rocket from Cape Canaveral at 12:23 UT on 17 October 2007. It will replace the aging GPS 2A-14 in Plane F and Slot 2.'},
{'PRN'=>16,'NORADID'=>27663,'INTCODE'=>'2003-005A','LD'=>'Jan 29 2003','OWN'=>'US','NAVSTAR'=>'51 USA-166','TRIV'=>'Navstar 51 (also known as USA 166, and as GPS 2R-8) is the latest to join the American (DoD) fleet of Global Positioning Satellites. It was launched by a Delta 2 rocket from Cape Canaveral at 18:06 UT on January 29 2003. The fleet is operating in full capacity with 24 spacecraft (in six planes, with four satellites in each). GPS 2R-8 will replace the aging GPS 2A-18, which will be shifted away in its Plane-B and then retired.'},
{'PRN'=>17,'NORADID'=>28874,'INTCODE'=>'2005-038A','LD'=>'Sep 26 2005','OWN'=>'US','NAVSTAR'=>'57 USA-183','TRIV'=>'Navstar 57, also known as USA 183 and as GPS 2R-M1 (and as GPS 2R-14), was launched by a Delta 2 rocket from Cape Canaveral AFS at 03:37 UT on 26 September 2005. It has three more frequency channels (with two more military and one more civilian), and is more secure against jamming and radiation than the older models. It will be positioned in Slot 4 of Plane C, taking over the duties of the aging GPS 2A-20 (that was launched in May 1993). It is planned to replace all the older members of the 28-satellite fleet with the updated 2R-M versions in a few years. (The perigee will be raised from 266 km to about 20,000 km soon.)'},
{'PRN'=>18,'NORADID'=>26690,'INTCODE'=>'2001-004A','LD'=>'Jan 30 2001','OWN'=>'US','NAVSTAR'=>'50 USA-156','TRIV'=>'NAVSTAR 50 (USA 156) is an American GPS navigational spacecraft that was launched by a Delta 2 rocket from Vandenberg AFB at 07:55 UT. The two-ton satellite is the 28th member of the "second generation" fleet, four of which (including the latest) being replacements for the older models. A case history of all GPS spacecraft is available at http://leonardo.jpl.nasa.gov/msl/Programs/gps.html. In GPS parlance, the spacecraft is GPS 2-28.'},
{'PRN'=>19,'NORADID'=>28190,'INTCODE'=>'2004-009A','LD'=>'Mar 20 2004','OWN'=>'US','NAVSTAR'=>'54 USA-177','TRIV'=>'Navstar 54, also known as USA 177 and as GPS 2R-11 is an American navigational satellite in the GPS fleet. It was launched by a Delta 2 rocket from Cape Canaveral at 17:39 UT on 20 March 2004. It will take Slot 3 in Plane C, replacing the aging GPS 2A-19. The fleet consists of 24 operational satellites (plus a few spares) located in six (inertial) planes with four slots in each.'},
{'PRN'=>20,'NORADID'=>25360,'INTCODE'=>'2000-025A','LD'=>'May 11 2000','OWN'=>'US','NAVSTAR'=>'47 USA-150','TRIV'=>'Navstar 47 (USA 150) was the latest addition to the American GPS fleet of navigation satellites, and was launched by a Delta 2 rocket from Cape Canaveral at 01:48 UT. The 24-spacecraft fleet was completed in 1994, but Navstar 47 replaced a failing member. GPS navigational location had until recently been at 100 meter accuracy for civilian use signals, and at 20 meter accuracy for military use signals. As of 1 May 2000, the DoD had voided the intentional degradation of the accuracy for civilian use, and made it on a par with the military accuracy. But it retained the prerogative to degrade the accuracy at selected locations when necessary. Also known as PRN20 (in GPS parlance), it replaced the failing PRN14 in Slot E-1. An update of the GPS fleet has been provided by Richard B. Langley, and is appended in section C-2.'},
# 20
{'PRN'=>21,'NORADID'=>27704,'INTCODE'=>'2003-010A','LD'=>'Mar 31 2003','OWN'=>'US','NAVSTAR'=>'52 USA-168','TRIV'=>'Navstar 52, also known as USA 168 and as GPS 2R-9, is an American Global Positioning Satellite that was launched by a Delta 2 rocket from Cape Canaveral AFS at 22:09 UT on 31 March 2003. It will replace the aging GPS 2-5 in the fleet (of 28 satellites).'},
{'PRN'=>22,'NORADID'=>28129,'INTCODE'=>'2003-058A','LD'=>'Dec 21 2008','OWN'=>'US','NAVSTAR'=>'53 USA-175','TRIV'=>'Navstar 53, also known as USA 175, as GPS 2R-10, and as SVN-47, is an American navigational satellite in the GPS fleet. It was launched by a Delta 2 rocket from Cape Canaveral AFS at 07:50 UT on 21 December 2003. It will replace the aging but still operational GPS 2A-10 craft in Plane-E and Slot-2. The GPS constellation consists of 24 satellites split into six orbital planes with four in each plane, all in circular orbits of altitude 20,200 km, and inclination of 55 degrees. There are also four additional satellites orbiting as reserves. The full list is available at'},
{'PRN'=>23,'NORADID'=>28361,'INTCODE'=>'2004-023A','LD'=>'Jun 23 2004','OWN'=>'US','NAVSTAR'=>'55 USA-178','TRIV'=>'NAVSTAR 55, also known as USA 178, and as GPS 2R-12, is an American navigational satellite in the GPS fleet that was launched from Cape Canaveral by a Delta 2 rocket at 22:54 UT on 23 June 2004. The 2.1 tonne satellite will soon be manuevered into Slot 4 in Plane F to replace the aging GPS 2A-16 that was launched in November 1992. (GPS 2A-16 will however be repositioned in the same Plane as a backup, till its failue. Links to GPS fleet is available in section C-2 below.'},
{'PRN'=>24,'NORADID'=>21552,'INTCODE'=>'1991-047A','LD'=>'Jul 4 1991','OWN'=>'US','NAVSTAR'=>'23 USA-71','TRIV'=>$generic_desc},
{'PRN'=>25,'NORADID'=>36585,'INTCODE'=>'2010-022A','LD'=>'May 28 2010','OWN'=>'US','NAVSTAR'=>'65 USA-213','TRIV'=>'Navstar 65/GPS 2F-1, a US Air Force satellite also known as USA 213, was launched into orbit by a Delta 4 rocket from Cape Canaveral on 28 May 2010 at 03:00 UT. This is the first in a new breed of GPS satellites in the Block 2F series, which features even higher accuracy, enhanced internal clocks, longer life and reprogrammable on-board processors able to evolve with future needs. It will take over the position presently held by the GPS 2A-27 satellite (Plane B, Slot 2), which is considered one of the primary positions in the constellation.'},
{'PRN'=>26,'NORADID'=>22014,'INTCODE'=>'1992-039A','LD'=>'Jul 7 1992','OWN'=>'US','NAVSTAR'=>'26 USA-83','TRIV'=>$generic_desc},
{'PRN'=>27,'NORADID'=>22108,'INTCODE'=>'1992-058A','LD'=>'Sep 9 1992','OWN'=>'US','NAVSTAR'=>'27 USA-84','TRIV'=>$generic_desc},
{'PRN'=>28,'NORADID'=>26407,'INTCODE'=>'2000-040A','LD'=>'Jul 16 2000','OWN'=>'US','NAVSTAR'=>'48 USA-151','TRIV'=>'Navstar 48 (USA 151) is an American navigational satellite in the GPS constellation that was launched by a Delta 2 rocket from Cape Canaveral at 09:17 UT. The total number in the fleet is now 29, including five spares.'},
{'PRN'=>29,'NORADID'=>32384,'INTCODE'=>'2007-062A','LD'=>'Dec 20 2007','OWN'=>'US','NAVSTAR'=>'61 USA-199','TRIV'=>'GPS 2R-18, also known as GPS 2R-M, Navstar 61, and USA 199, is a navigational craft in the American GPS fleet that was launched by a Delta 2 rocket from Cape Canaveral at 20:04 UT on 20 December 2007. The 2.04 tonne (with fuel) craft will be moved to Slot 1 in Plane C, replacing GPS 2A-24, which will in turn be moved to replace the ailing GPS 2A-20.'},
{'PRN'=>30,'NORADID'=>22779,'INTCODE'=>'1993-054A','LD'=>'Aug 30 1993','OWN'=>'US','NAVSTAR'=>'34 USA-94','TRIV'=>$generic_desc},
# 30 
{'PRN'=>31,'NORADID'=>29486,'INTCODE'=>'2006-042A','LD'=>'Sep 25 2006','OWN'=>'US','NAVSTAR'=>'58 USA-190','TRIV'=>'GPS 2R-15 is an American navigational satellite in the GPS fleet that was launched by a Delta 2 rocket from Cape Canaveral at 18:50 UT on 25 September 2006. It will be positioned in Plane A, Slot 2, replacing the aging GPS 2-12 launched in 1992, which, in turn, will be maneuvered to A-4 as a backup till its useful life ends. At present there are 24 operational craft in the fleet, plus 5 that are spares.'},
{'PRN'=>32,'NORADID'=>20959,'INTCODE'=>'1990-103A','LD'=>'Nov 26 1990','OWN'=>'US','NAVSTAR'=>'22 USA-66','TRIV'=>$generic_desc});

sub new{ # create our new object:
	if($_[1] == 1){
		%sat = %prn1;
	}elsif($_[1] == 2){
		%sat = %prn2;
	}
	my ($class_name) = @_;
    	my $self = {};
   	bless ($self, $class_name);
	$self->{_created} = 1;
	$sat = $_[1];
	return $self;
}
sub satdata{
	return $sats[$sat]{$_[1]};
}

1;
